﻿<%@ Page Title="" Language="C#" MaintainScrollPositionOnPostback="true" MasterPageFile="~/companypart/CompanyMastermaster.master" AutoEventWireup="true" CodeFile="AddProduct.aspx.cs" Inherits="AddProduct" meta:resourcekey="PageResource1"%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/ImageListItem.ascx" TagName="ImageListItem" TagPrefix="UserControl" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>المجلات والصحف</title>
    <style type="text/css">
    tr .tabbone4{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:right;
}
.adel4{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  right;
}
         .zr3 {
	background-image:url('../images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('../images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
	 border-radius:5px;
}
.he3{
	background-color:#fff;
	
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
.txt3
{
    border:1px solid black;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true">
    <ContentTemplate>
    
                  <table  dir="rtl" width="100%">
  <tr>
  <td style="padding:5px; width:100px;">
      <asp:Label ID="Label1" CssClass="stylelabel3" runat="server" meta:resourceKey="word" Text="كلمة البحث"></asp:Label></td>
  <td style="padding:5px; width:200px;"><asp:TextBox ID="searchfield" runat="server" CssClass="txt3" CausesValidation="True" 
           AutoPostBack="true" 
        ontextchanged="searchfield_TextChanged" Width="180px" ></asp:TextBox>
     
 <asp:AutoCompleteExtender ID="To_AutoCompleteExtender" runat="server" MinimumPrefixLength="1"   
    ServiceMethod="GetACTList"  ServicePath="~/SelectMail.asmx" Enabled="True"  TargetControlID="searchfield" UseContextKey="true" ContextKey="product">
   
       
    </asp:AutoCompleteExtender>
    </td>
  <td></td>
  </tr>
<tr>
  
<td  style="padding:5px; width:100px;">

         <asp:Label ID="Label2" CssClass="stylelabel3" runat="server" meta:resourceKey="position"  Text="موضع البحث"></asp:Label></td>
 


<td style="padding:5px; width:200px;">
    <asp:DropDownList ID="DropDownList1" CssClass="txt3" runat="server" 
        Width="180px" >
       
        <asp:ListItem Selected="True" Value="0"  meta:resourceKey="all" >الكل</asp:ListItem>
        <asp:ListItem Value="address" meta:resourceKey="address" >العنوان</asp:ListItem>
        <asp:ListItem Value="repname" meta:resourceKey="name" >اسم الجهة</asp:ListItem>
        <asp:ListItem Value="companyname" meta:resourceKey="company" >اسم الشركة</asp:ListItem>
        <asp:ListItem Value="email1"  meta:resourceKey="email" >الايميل</asp:ListItem>
       
    </asp:DropDownList>

</td>
<td align="right" >

    <asp:Button ID="Button1" runat="server" CssClass="zr3" 
        onclick="ImageButton1_Click" Text="إبحث" meta:resourceKey="search"  />
    
</td>
</tr>
</table>



      <table>
<tr>
    


<td >             
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="SqlDataSource1" 
                     OnRowCreated="GridView1_RowCreated"
                    AllowPaging="true" GridLines="None" PageSize="5">
                    <PagerSettings FirstPageText="الاولى" LastPageText="الاخيرة" Mode="NumericFirstLast"
                        NextPageText="التالى" PreviousPageText="السابق" />
                    <Columns>
                        <asp:TemplateField>
                        <HeaderTemplate>
                        <table width="100%">
                        <tr>
                        <td align="right">
                            <asp:Label CssClass="he3" ID="Label4" runat="server" meta:resourceKey="header" Text="المجلات والصحف"></asp:Label>
                        </td>
                        </tr>
                        </table>
                        <br />
                        </HeaderTemplate>
                            <ItemTemplate>
                         <table class="tab3" style="margin-bottom:5px;background-color:#ededed">
                         <tr>
                         <td>
                                    <table dir="rtl" align="right" class="adel3" width="800">
    <tr >
    <td colspan="5">
    <table class="tab3" style="width:805px;  margin-top:-13px; background-color:#028ac5;color:#fff">
    <tr>
  
    <td style=" padding-top:5px; padding-right:5px; padding-bottom :5px; width:50px;" align="right">
                                                <asp:Label ID="lblendofsubs" Font-Bold="true" runat="server" Text="الكتاب/الدورية" meta:resourceKey="lblendofsubs"
                                                     />
                                            </td>
    <td style=" padding-top:5px;padding-right:5px; padding-bottom :5px;" align="right">
                                            <asp:Label  ID="Label11" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product"))) %>'
                                                 Font-Bold="True" />
                                        </td>
    <td colspan="2" style=" padding-top:5px;padding-right:5px; padding-bottom :5px; width:40px;" align="left">
                                                <asp:Label ID="Label7"  Font-Bold="true" runat="server"  Text="النوع" meta:resourceKey="lbltype" />
                                            </td>
    <td style=" padding-top:5px;padding-right:5px; padding-bottom :5px;width:50px;" align="right">
                                            <asp:Label  Font-Bold="True"  ID="Label12" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product_type"))) %>'
                                                 />
                                        </td>
       
    <td rowspan="3" style=" padding-top:5px; padding-bottom :5px; width:30px;">
      <asp:Label ID="Label3" Visible="false" runat="server" Text="عرض" meta:resourceKey="lblshow" Font-Bold="True" />
                               
                                                <asp:CheckBox runat="server" ID="chkAdd"   AutoPostBack="True" 
                                              Font-Bold="True"   oncheckedchanged="CheckBox1_CheckedChanged" 
                                               ToolTip='<%# String.Format("{0}~ {1} ~{2}", Eval("id"), Eval("product"),Eval("puplisher_id")) %>' ></asp:CheckBox> 
                          
                                            </td>
     </tr>
    </table>
                                            </td>

    </tr>
     <tr>
    <td style=" padding-top:5px;padding-right:5px; padding-bottom :5px; width:70px;" align="right" >
                                                <asp:Label ID="lblstops" CssClass="stylelabel3"  runat="server" Text="الوصف" meta:resourceKey="lblstop"  />
                                            </td>
    <td colspan="2" style=" padding-top:5px; padding-bottom :5px;" align="right">
                                            <asp:Label  Font-Bold="True"  ID="Label10" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("productdesc"))) %>'
                                                 />
                                        </td>
    <td style=" padding-top:5px; padding-bottom :5px;" align="right">
                                                <asp:Label ID="lblstartofsubs" CssClass="stylelabel3"  runat="server" Text="المؤلف" meta:resourceKey="lblstartofsubs"
                                                     />
                                        </td>
    <td style=" padding-top:5px; padding-bottom :5px;" align="right">
                                            <asp:Label  Font-Bold="True"  ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("auther1"))) %>'
                                                 />
                                        </td>

    </tr>
      <tr>
    <td style=" padding-top:5px;padding-right:5px; padding-bottom :5px;" align="right">
                                                <asp:Label ID="lblpaidfees" CssClass="stylelabel3"  runat="server" Text="النشر والتوزيع" meta:resourceKey="lblpaidfees"
                                                     />
                                            </td>
    <td colspan="4" style=" padding-top:5px; padding-bottom :5px;" align="right">
                                            <asp:Label Font-Bold="True"   ID="paidfees" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("publisher"))) %>'
                                                 />
                                        </td>

    </tr>
      <tr>
    <td style=" padding-top:5px;padding-right:5px; padding-bottom :5px;" align="right">
                                                <asp:Label ID="lbltopic" CssClass="stylelabel3"  runat="server" Text="الموضوع" meta:resourceKey="lbltopic"
                                                     />
                                            </td>
    <td style=" padding-top:5px; padding-bottom :5px;" align="right">
                                            <asp:Label Font-Bold="True"   ID="Label15" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("topic"))) %>'
                                                 />
                                        </td>
    <td colspan="2" style=" padding-top:5px; padding-bottom :5px; width:80px;" align="right">
                                                <asp:Label ID="lblissn" CssClass="stylelabel3"  runat="server" Text="الرقم التعريفى" meta:resourceKey="lblissn"
                                                     />
                                            </td>
    <td style=" padding-top:5px; padding-bottom :5px;" align="right">
                                            <asp:Label  Font-Bold="True"  ID="Label13" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("issn"))) %>'
                                                 />
                                        </td>
    <td style=" padding-top:5px; padding-bottom :5px;" align="right"></td>

    </tr>
     <br/>
    </table>
                        </td>
                         </tr>
                         </table>
                         
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <%--<FooterStyle BackColor="#C7F1B1" Font-Bold="false" ForeColor="White" />
                    <PagerStyle BackColor="#C7F1B1" ForeColor="#333333" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#1E83F2" Font-Bold="false" ForeColor="Navy" />
                    <HeaderStyle BackColor="#0667b6" Font-Bold="false" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#ebebeb" />--%>
                </asp:GridView>
   </td>
</tr>
<tr>
<td>             
 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="select p.*,t.product_type from  products p INNER JOIN product_types t ON (t.id = p.product_type_id )where p.product_type_id=2">
                </asp:SqlDataSource>
             
                 <asp:Panel ID="ListT" runat="server" Height="200px" Width="500" BorderStyle="Groove"
                                EnableViewState="true" BorderColor="Black" BorderWidth="2px"
                       Direction="RightToLeft"  ScrollBars="Both" Wrap="true" >
                            </asp:Panel>
                            </td>
</tr>

</table>
</ContentTemplate>
    </asp:UpdatePanel>
    <table>
    
    <tr>
<td align="center">  
    <asp:Button  ID="save" CssClass="zr3" runat="server" Text="حفظ"  meta:resourceKey="lblsave" onclick="save_Click" /> 
               </td>
               
</tr>
</table>
</asp:Content>

